<html>
   <head>
      <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
   
      <link rel="stylesheet" href="./../../helpwin.css">
      <title>MATLAB File Help: prtRvVq/prtRvVq</title>
   </head>
   <body>
      <!--Single-page help-->
      <table border="0" cellspacing="0" width="100%">
         <tr class="subheader">
            <td class="headertitle">MATLAB File Help: prtRvVq/prtRvVq</td>
            
            
         </tr>
      </table>
      <div class="title">prtRvVq/prtRvVq</div>
      <div class="helptext"><pre><!--helptext -->  <span class="helptopic">prtRvVq</span>  Vector quantization random variable
 
    RV = <span class="helptopic">prtRvVq</span> creates a <span class="helptopic">prtRvVq</span> object with empty means and
    probabilities. The means and probabilties must be set either
    directly, or by calling the MLE method.
   
    Vector quanitization uses k-means to discretize the data space
    using nCategories means. The means are the discrete points in space and
    have probabilies representing their prominence in the data. The
    pdf is calculated by mapping to the nearest entry of the means and
    giving the data point the corresponding entry in probabilities.
 
    RV = <span class="helptopic">prtRvVq</span>(PROPERTY1, VALUE1,...) creates a <span class="helptopic">prtRvVq</span> object RV
    with properties as specified by PROPERTY/VALUE pairs.
 
    A <span class="helptopic">prtRvVq</span> object inherits all properties from the prtRv class. In
    addition, it has the following properties:
 
    nCategories   - The number of categories
    means         - The means of each catergory that are used to 
                    approximate the density
    probabilities - The probabilities of each category
    
   A <span class="helptopic">prtRvVq</span> object inherits all methods from the prtRv class. The MLE
   method can be used to estimate the distribution parameters from
   data.
 
   Example:
 
   dataSet = prtDataGenUnimodal;        % Load a dataset consisting of
                                        % 2 features
   dataSet = retainFeatures(dataSet,1); % Retain only the first feature
 
   RV = <span class="helptopic">prtRvVq</span>;                        % Create a <span class="helptopic">prtRvVq</span> object
   RV = RV.mle(dataSet);                % Compute the VQ parameters
                                        % form the data
   RV.plotPdf                           % Plot the pdf</pre></div><!--after help --><!--seeAlso--><div class="footerlinktitle">See also</div><div class="footerlink"> <a href="./../prtRv.html">prtRv</a>, <a href="./../prtRvMvn.html">prtRvMvn</a>, <a href="./../prtRvGmm.html">prtRvGmm</a>, <a href="./../prtRvMultinomial.html">prtRvMultinomial</a>,
    <a href="./../prtRvUniform.html">prtRvUniform</a>, <a href="./../prtRvUniformImproper.html">prtRvUniformImproper</a>
</div>
   </body>
</html>